package czh.cocoa.foundation;

public class NSMutableDictionary extends NSDictionary {

	public static NSMutableDictionary dictionaryWithObjectsAndKeys(NSObject... objects) {
		return new NSMutableDictionary(NSDictionary.dictionaryWithObjectsAndKeys(objects)); 
	}
	
	public NSMutableDictionary() {
		super();
	}
	
	public NSMutableDictionary(int capacity) {
		super(capacity);
	}
	
	public NSMutableDictionary(NSDictionary dictionary) {
		super(dictionary);
	}
	
	public NSMutableDictionary(NSArray objects, NSArray keys) {
		super(objects, keys);
	}
	
	public void setObjectForKey(NSObject object, NSObject key) {
		mDictionary.put(key, object);
	}
	
	public void removeObjectForKey(NSObject key) {
		mDictionary.remove(key);
	}
	
	public void removeAllObjects() {
		mDictionary.clear();
	}
	
	//additional
	public void setFloatForKey(float value, NSObject key) {
		NSObject object = new NSNumber(value);
		setObjectForKey(object, key);
	}
	
	//additional
	public void setIntForKey(int value, NSObject key) {
		NSObject object = new NSNumber(value);
		setObjectForKey(object, key);
	}
	
	//additional
	public void setBoolForKey(boolean value, NSObject key) {
		NSObject object = new NSNumber(value);
		setObjectForKey(object, key);
	}

}
